With increase in storage capacity, lower cost, or the like of a semiconductor storage device (for example, a flash memory) in recent years, applications of a semiconductor storage device have been expanded. Typically, a semiconductor storage device is made use of in such a state as being contained in various apparatuses or in a removable form.
For such a semiconductor storage device, from a point of view of increase in storage capacity and lower cost, a technique for storing a plurality of bits in one storage element (memory cell) has been developed. A conventional semiconductor storage device in which one memory cell holds 1-bit data is referred to as an SLC (Single Level Cell) type, whereas such a semiconductor storage device as above is referred to as an MLC (Multi Level Cell) type in the sense that one memory cell holds data of a plurality of bits. Since the MLC type semiconductor storage device can hold data of a plurality of bits in one memory, it can be greater in capacity than the SLC type, on condition that the number of memory cells is the same.
In writing and reading data into and from the MLC type semiconductor storage device as described above, when a memory cell in which data to be accessed is stored is accessed, the memory cell to be accessed may have stored data other than data of interest. Namely, (respective parts of) two types of data may be stored in the same memory cell.
Under such circumstances, if some kind of error occurs in a memory cell itself of interest or in a portion managing the memory cell of interest at the time of access involved with certain data, data other than data to be accessed may also be affected.
An exemplary embodiment provides a non-transitory storage medium encoded with a computer readable program capable of protecting specific data against an error caused by access to another piece of data. Other exemplary embodiments provide an information processing system, an information processing apparatus, and an information processing method capable of protecting specific data against an error caused by access to another piece of data.
An exemplary embodiment provides a non-transitory storage medium encoded with a computer readable program executable by a computer, for writing data in a semiconductor storage device capable of storing a plurality of bits in one memory cell. The program causes the computer to perform an allocation step of allocating a first area for storing first data in a storage area of the semiconductor storage device and a writing step of writing the first data only in an area of use, with a prescribed size from a boundary of the first area being defined as a protection area and a remaining area being defined as the area of use in response to a request for writing the first data.
According to the exemplary embodiment, the first data is written only in the area of use, and an area adjacent to the area of use is allocated as the protection area. This protection area can prevent another piece of data from being written in the area adjacent to the first data. Thus, the first data can be protected against an error caused by access to another piece of data.
In an exemplary embodiment, the allocation step includes the step of writing information for handling the first area as a single piece of data in the semiconductor storage device.
According to the exemplary embodiment, since the first area is handled as a single piece of data, such a configuration that a protection area is allocated adjacent to the area of use can be maintained.
In an exemplary embodiment, the allocation step includes the step of writing file management information for handling the first area as a single file in the semiconductor storage device.
According to the exemplary embodiment, since not only a computer where the first area is allocated but also other computers handle the first area as a single file, such a situation that a protection area allocated adjacent to the area of use is deleted can be avoided.
In an exemplary embodiment, the allocation step includes the step of writing area management information for distinguishing between the area of use and the protection area included in the first area in the semiconductor storage device.
According to the exemplary embodiment, the first area is handled as a single piece of data, while the area of use where the first data is stored can readily be specified.
In an exemplary embodiment, the storage area of the semiconductor storage device includes a second area for managing a file stored in the storage area, and the area management information is stored in the second area.
According to the exemplary embodiment, the first area can be managed by using management information the same as that for another file stored in the storage area of the semiconductor storage device.
In an exemplary embodiment, the area management information is stored in the protection area.
According to the exemplary embodiment, a protection area basically not used for storage of data can effectively be made use of.
In an exemplary embodiment, the area management information includes an offset value indicating a size from a boundary of a third area for storing second data different from the first data to the area of use.
According to the exemplary embodiment, since an offset value is used, processing for distinguishing between the area of use and the protection area can be facilitated.
In an exemplary embodiment, the area management information includes a parameter for calculating a start position of the area of use in the first area in accordance with a prescribed calculating formula.
According to the exemplary embodiment, the area of use and the protection area can be distinguished from each other without separately storing such a value as an offset value. In addition, by concealing a calculating formula for distinguishing between the area of use and the protection area, even when another computer or the like makes an access, security for data stored in the area of use can be enhanced.
In an exemplary embodiment, the allocation step includes the step of determining a size of the protection area in association with a size of a block constituted of a plurality of memory cells in the semiconductor storage device.
According to the exemplary embodiment, by determining a size of the protection area in association with structural characteristics of the semiconductor storage device, first data stored in the area of use can reliably be protected.
In an exemplary embodiment, the size of the protection area is determined in association with a block which is an erase unit in the semiconductor storage device.
According to the exemplary embodiment, by allocating the protection area to a plurality of memory cells in association with a block which is an erase unit, data in which may be destructed, the first data stored in the area of use can reliably be protected.
In an exemplary embodiment, the protection area having at least a size of the block which is an erase unit is allocated.
According to the exemplary embodiment, at whichever position an area where the first data is to be stored may be arranged, storage of the first data and another piece of data in a block which is one erase unit can be prevented. Therefore, the first data stored in the area of use can reliably be protected.
In an exemplary embodiment, the protection area is allocated to include an area from the area of use to a boundary corresponding to a boundary of the block.
According to the exemplary embodiment, storage of the first data and another piece of data in a certain block can be prevented. Therefore, the first data stored in the area of use can reliably be protected.
In an exemplary embodiment, the allocation step includes the step of obtaining a block size regarding a semiconductor storage device to be accessed, by obtaining identification information of the semiconductor storage device to be accessed and referring to a table in which the identification information and a block size are brought in correspondence with each other.
According to the exemplary embodiment, though a size of a block is different depending on difference in characteristic value of the semiconductor storage device, the protection area can be set to an appropriate size in spite of such a difference in block size.
In an exemplary embodiment, the allocation step includes the step of obtaining by accessing a semiconductor storage device to be accessed, a block size regarding the semiconductor storage device.
According to the exemplary embodiment, the protection area can be set to an appropriate size in accordance with the semiconductor storage device in which the first data is to be written.
In an exemplary embodiment, the writing step includes the step of writing a plurality of files in the first area handled as a single file.
According to the exemplary embodiment, since a plurality of files can be written in a common area of use, efficiency in use of a storage capacity of the semiconductor storage device can be enhanced.
In an exemplary embodiment, the plurality of files are managed as files in a file system different from a file system handling the single file.
According to the exemplary embodiment, for example, since a general-purpose file system and a special file system which only a particular model or application can use can be mounted, data can be stored in accordance with an application thereof.
In an exemplary embodiment, the program causes the computer to further perform an area specifying step of specifying the first area where the first data is stored in the storage area of the semiconductor storage device, an evaluation step of evaluating appropriateness of the area of use and the protection area allocated to the specified first area, in association with a block regarding the semiconductor storage device, and a re-allocation step of re-allocating the protection area when evaluation as inappropriate is made in the evaluation step.
According to the exemplary embodiment, even when the first data is written in another semiconductor storage device, a proper protection area can be set in the semiconductor storage device in which the first data is written.
An exemplary embodiment provides an information processing system including at least one operation processing unit and a non-transitory storage medium encoded with a computer readable program executed by the operation processing unit. The information processing system includes an allocation unit for allocating a first area for storing first data in a storage area of a semiconductor storage device. The semiconductor storage device is configured to store a plurality of bits in one memory cell. The information processing system includes a writing unit for writing the first data only in an area of use, with a prescribed size from a boundary of the first area being defined as a protection area and a remaining area being defined as the area of use in response to a request for writing the first data.
According to the exemplary embodiment, the first data is written only in the area of use, and an area adjacent to the area of use is allocated as the protection area. This protection area can prevent another piece of data from being written in the area adjacent to the first data. Thus, the first data can be protected against an error caused by access to another piece of data.
An exemplary embodiment provides an information processing apparatus incorporating a function to write data in a semiconductor storage device capable of storing a plurality of bits in one memory cell. The information processing apparatus includes an allocation unit for allocating a first area for storing first data in a storage area of the semiconductor storage device and a writing unit for writing the first data only in an area of use, with a prescribed size from a boundary of the first area being defined as a protection area and a remaining area being defined as the area of use in response to a request for writing the first data.
According to the exemplary embodiment, the first data is written only in the area of use, and an area adjacent to the area of use is allocated as the protection area. This protection area can prevent another piece of data from being written in the area adjacent to the first data. Thus, the first data can be protected against an error caused by access to another piece of data.
An exemplary embodiment provides an information processing method for writing data in a semiconductor storage device capable of storing a plurality of bits in one memory cell, which is performed in a computer. The information processing method includes an allocation step of allocating a first area for storing first data in a storage area of the semiconductor storage device and a writing step of writing the first data only in an area of use, with a prescribed size from a boundary of the first area being defined as a protection area and a remaining area being defined as the area of use in response to a request for writing the first data.
According to the exemplary embodiment, the first data is written only in the area of use, and an area adjacent to the area of use is allocated as the protection area. This protection area can prevent another piece of data from being written in the area adjacent to the first data. Thus, the first data can be protected against an error caused by access to another piece of data.
The foregoing and other objects, features, aspects and advantages of the present invention will become more apparent from the following detailed description of the present invention when taken in conjunction with the accompanying drawings.